Embodiments of the inventive subject matter generally relate to the field of computerized file systems, and, more particularly, to distributed management of objects in a clustered redirect-on-write file system.
A snapshot is a common industry term either denoting the ability to record the state of a system at a given point in time, or referring to the actual copy of the state of the system. A snapshot can be used to restore a system or storage device in the event that it fails. Typically, a snapshot is done instantly and made available for use by other applications such as data protection, data analysis and reporting, and data replication applications. File systems or volume managers use snapshot technology to maintain a consistent view of data. Snapshot technology can be implemented with a copy-on-write approach, or a redirect-on-write approach.
With the copy-on-write approach, a snapshot of a storage volume is created using a pre-designated space for the snapshot. When the snapshot is first created, only the meta-data about where original data is stored is copied. The data itself is not copied at the time the snapshot is created. Therefore, the creation of the snapshot is almost instantaneous. The snapshot technology then tracks the changing blocks on the original volume as writes to the original volume are performed. The original data that is being written to is copied into the designated storage pool that is set aside for the snapshot before original data is overwritten. Before a write is allowed to a block, copy-on-write moves the original data block to the snapshot storage. Read requests to the snapshot volume of the unchanged data blocks are redirected to the original volume, while read requests to data blocks that have been changed are directed to the “copied” blocks in the snapshot. Snapshot contains the meta-data that describes the data blocks that have changed since the snapshot was first created.
With the redirect-on-write approach, new writes to an original volume are redirected to another location set aside for a snapshot. Thus, one write takes place with redirect-on-write, whereas two writes occur (one to copy original data onto the storage space, the other to copy changed data) with copy-on-write.